package com.huluobo.jetpackkotlindemo.room

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey

/**
 * Created by lc on 2022/12/12.
 * 1.@Entity标记的实体类创建对应的数据库的表,需要使用tableName添加表名
 * 2.@PrimaryKey(autoGenerate = true) 标记一个属性为主键自增
 * 3.@ColumnInfo(name = "_loginAccount") 标记一个属性为列名
 */
@Entity(tableName = "Account")
data class AccountBean(
    @PrimaryKey(autoGenerate = true)
    var accountId: Int?,
    @ColumnInfo(name = "_loginAccount")
    var loginAccount: String,
    @ColumnInfo(name = "_loginPassword")
    var loginPassword: String,
    @ColumnInfo(name = "_loginIpAddress")
    var loginIpAddress: String
)
